package TP2.dataGen;

import anaydis.sort.data.DataSetGenerator;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class IntegerDataSetGenerator implements DataSetGenerator{

    public Comparator getComparator(){
        return new IntComparator();
    }

    public List<Integer> createAscending(int i){
        List<Integer> list = new ArrayList<Integer>();
        for(int j = 0; j < i; j++){
            list.add(j);
        }
        return list;
    }

    public List<Integer> createDescending(int i){
        List<Integer> list = new ArrayList<Integer>();
        for(int j = (i-1); j > -1; j--){
            list.add(j);
        }
        return list;
    }

    public List<Integer> createRandom(int i){
        List list = createAscending(i);
        Collections.shuffle(list);
        return list;
    }

}
